import $r from '@/utils/request'

export async function getAlbum(params = {}, method = 'POST') {
  return $r('/Amaidan-Goods-Web/goods/resCommonsAlbum/selectAll', {
    method,
    data: params,
  })
}

export async function getAlbumPicture(params = {}, method = 'POST') {
  return $r('/Amaidan-Goods-Web/goods/resCommonsAlbumImage/pageQueryByAlbumId', {
    method,
    data: params,
  })
}

export async function addCommonsAlbum(params = {}, method = 'POST') {
  return $r('/Amaidan-Goods-Web/goods/resCommonsAlbum/add', {
    method,
    data: params,
  })
}

export async function delOnePic(params = {}, method = 'POST') {
  return $r('/Amaidan-Goods-Web/goods/resCommonsAlbumImage/deleteByIdOrUrl', {
    method,
    data: params,
  })
}

export async function fetchGoodsList(params = {}, method = 'POST') {
  return $r('/Amaidan-Goods-Web/resGoods/change/selectGoodsStatus', {
    method,
    data: params,
  })
}

export async function fetchGoodsSelectById(params = {}, method = 'POST') {
  return $r('/Amaidan-Goods-Web/resGoods/selectById', {
    method,
    data: params,
  })
}
